#include<iostream>
using namespace std;
typedef unsigned long long ULL;
const int N = 10010;
int n, m;	
char str[N];
ULL h[N], p[N];
int P = 131;
ULL get(int l, int r)
{
	return h[r] - h[l - 1] * p[r - l + 1];
}
int main()
{
	cin >> n >> m >> str + 1;
	p[0] = 1;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] * P;
		h[i] = h[i - 1] * P + str[i];
	}
	while (m--) {
		int x1, y1, x2, y2;
		cin >> x1 >> y1 >> x2 >> y2;
		if (get(x1, y1) == get(x2, y2)) {
			cout << "yes" << endl;
		}
		else {
			cout << "no" << endl;
		}
	}
	return 0;
}